package com.mllweb.api.web.controller;

import com.mllweb.api.core.json.JsonProtocol;
import com.mllweb.api.data.orm.EmailVitae;
import com.mllweb.api.service.EmailVitaeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * 邮件简历控制器
 */
@RestController
public class EmailVitaeController {
    @Autowired
    private EmailVitaeService emailVitaeService;

    @RequestMapping(value = "/employ", method = RequestMethod.GET)
    public JsonProtocol send(EmailVitae emailVitae) {
        Map<String, Integer> map = new HashMap<>();
        JsonProtocol protocol = new JsonProtocol();
        protocol.setCode(emailVitaeService.insert(emailVitae));
        return protocol;
    }
}
